<?php
/**
 * Copyright (c) 2018-2019.
 *  This file is part of the moonpie production
 *  (c) johnzhang <875010341@qq.com>
 *  This source file is subject to the MIT license that is bundled
 *  with this source code in the file LICENSE.
 */

namespace moonpie\plugin\wechat_account\service\template;

/**
 * 用来处理模板变量解析的解析器接口
 * Interface TemplateVarParserInterface
 * @package moonpie\plugin\wechat_account\service\template
 */
interface TemplateVarParserInterface
{
    /**
     * 获取解析器需要的上下文数据
     * @return mixed
     */
    public function getContext();

    /**
     * 将传递过来的模板数据封装成EasyWechat可识别的微信模板
     * @param array $data
     * @return array
     */
    public function parse(array $data);
}